{* ÜÖÄ *}
{*
<pre>
{$classConfig|@print_r:true}
</pre>*}
	<form id="table_config_form_{$class.class_id}" onsubmit="return false;" />
		<input type="hidden" name="class_id" value="{$class.class_id}" />
		{if true == $new_table}
			<input type="hidden" name="new_table" value="true" />
			{$smarty.config.Classeditor_tablename}: <input type="text" name="tablename" value="{$tablename}"><br /><br />
		{else}
			<input type="hidden" name="tablename" value="{$tablename}" />
		{/if}
		{if true == $import_table}
			<input type="hidden" name="import_table" value="true" />
		{/if}
		{if "" != $error}
		<p class="error">
			{$error}
		</p>
		{/if}
		<table id="table_config_{$class.class_id}" class="tableList" cellspacing="0" cellpadding="2" width="100%" >
			<thead>
				<tr>
					<th><img src="{$CMS_LIBRARY_WEB}famfamfam/icons/database.png" /> </th>
					<th>{$smarty.config.Classeditor_label}</th>
					<th>{$smarty.config.Classeditor_fieldname}</th>
					<th>{$smarty.config.Classeditor_fieldtype}</th>
					<th>{$smarty.config.Classeditor_fieldlength}</th>
					<th>{$smarty.config.Classeditor_formtype}</th>
					<th>&nbsp;</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
				{foreach name="clsloop" from=$classConfig->data->columns[0] key="key" item="col"}
					{include file="`$ccdsClassEditor_DIR`class_config_table_field.tpl" key=$key col=$col}
				{/foreach}
			</tbody>
		</table>
		<div style="padding:4px;">
			{$smarty.config.Classeditor_version_control}
			<select name="version_control" size="1">
				<option value="1" {if '1' == $classConfig->data->version_control}selected="selected"{/if}>{$smarty.config.Classeditor_on}</option>
				<option value="0" {if '0' == $classConfig->data->version_control}selected="selected"{/if}>{$smarty.config.Classeditor_off}</option>
			</select><br /><br />
			
			<input type="button" value="{$smarty.config.Classeditor_add_field}" class="add" onclick="{strip}{literal}
		
				xajax.request(
				{
					ccdsclass:'ccdsClassEditor',
					ccdsfun: 'ClassEditorClassConfigAddRow'
				}
				,
				{
					parameters: [
						{/literal}
							xajax.getFormValues('table_config_form_{$class.class_id}',true),'field'
						{literal}
					]
				}
				);
						
						{/literal}{/strip}">

			<input type="button" value="{$smarty.config.Classeditor_add_row}" class="add" style="width:130px" onclick="{strip}{literal}
		
				xajax.request(
				{
					ccdsclass:'ccdsClassEditor',
					ccdsfun: 'ClassEditorClassConfigAddRow'
				}
				,
				{
					parameters: [
						{/literal}
							xajax.getFormValues('table_config_form_{$class.class_id}',true),'row'
						{literal}
					]
				}
				);
						
						{/literal}{/strip}">

			<input type="button" value="{$smarty.config.Classeditor_add_column}" class="add" style="width:130px" onclick="{strip}{literal}
		
				xajax.request(
				{
					ccdsclass:'ccdsClassEditor',
					ccdsfun: 'ClassEditorClassConfigAddRow'
				}
				,
				{
					parameters: [
						{/literal}
							xajax.getFormValues('table_config_form_{$class.class_id}',true),'column'
						{literal}
					]
				}
				);
						
						{/literal}{/strip}">


		<input type="button" value="{$smarty.config.Classeditor_save}" class="save" onclick="{strip}{literal}
	try {
		$('<div />').xWindow('confirm',{title:'logout',content:'{/literal}{$smarty.config.Classeditor_confirm_save}{literal}'}, function(){
			  xajax.request(
			  {
			  		ccdsclass:'ccdsClassEditor',
			      ccdsfun: 'ClassEditorClassConfigSave'
			  }
			  , 
			  {
			      parameters: [
			     	{/literal}
			      	xajax.getFormValues('table_config_form_{$class.class_id}',true)
			     	{literal}
			     ]
			  }
			  ); return true; 
			});				
	} catch(ex) {
	alert(ex);
	}
					{/literal}{/strip}">
		</div>
	</form>
